export const APP_TITLE = "JPrime Vite UI";
export const LOCALE_ZH_CN = "zh-CN";
export const LOCALE_EN = "en";
export const LANG_SESSION_KEY = "lang";

export const langOptions = [
  { lang: "zh-CN", name: "简体中文" },
  { lang: "en", name: "English" },
];

export default {
  APP_TITLE,
  LANG_SESSION_KEY: LANG_SESSION_KEY,
  LOCALE_ZH_CN,
  LOCALE_EN,
  defaultLang: (): string => {
    return (
      localStorage.getItem(LANG_SESSION_KEY) ||
      navigator.language ||
      LOCALE_ZH_CN
    );
  },
  langOptions,
};
